POV-Ray : Newsgroups : povray.newusers : Coupla "newb" questions... : Re: Coupla "newb" questions... Server Time
29 Jul 2024 12:22:24 EDT (-0400)
  Re: Coupla "newb" questions...  
From: St 
Date: 10 Jan 2006 13:22:15
Message: <43c3fb57@news.povray.org>
"Frango com Nata" <nomail@nomail> wrote in message 
news:web.43c3edfdb43d912cde6a74b0@news.povray.org...
> Well, we shouldn't expect it otherwise, since...
>
>>  blob {
>>  threshold 0.5
>>  #declare Length = 0;
>>  #while ( Length >= -30 )
>>   #declare Scale = 2;
>
> ..... this loop...
>
>>   #while ( Scale >= 0.25 )
>>
>>    #end
>
> ..... is terminated here, without altering Scale from its initial value 2:
> it'll never drop below 0.25, so making the execution everlasting.

   Ah, thank you. I'm not experienced at all with #declare and #while, but 
was quite pleased that I actually got it to parse after trying quite a few 
things. Thankfully, it was only parsing overnight...  ;)


> I think they should try this instead:
>
> blob {
>  threshold 0.5
>  #declare Length = 0;
>  #while ( Length >= -30 )
>    #declare Scale = 2;
>    #while ( Scale >= 0.25 )
>      sphere { <0,0,0>, 20, 1 scale <1,1,0.9>
>        translate <Length,0,0>
>        scale Scale
>      }
>      #declare Scale = Scale - 0.1;
>    #end
>   #declare Length = Length - 0.25;
>  #end
> }

 Oh, that parsed in what seemed like less than half a second! Image looks 
like it's going to be *real* slow though. The blob?

  Hope it helps the OP.

    ~Steve~


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.